<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!-- 轮播图 -->
    <jsp:include page="../include/meta.jsp">
        <jsp:param name="pageTitle" value="机构信息"/>
    </jsp:include>
</head>
<body>

<div id="wrapper">
    <jsp:include page="../include/head.jsp">
        <jsp:param name="menuIdx" value="6"/>
    </jsp:include>
    <jsp:include page="searchForm.jsp"/>
    <!-- 内容区域 -->
    <div class="container">
        <!-- 您的位置开始 -->
        <div class="location_wrap">
            <p>您的位置：<a href="index.html">首页</a>&nbsp;&gt;&nbsp;<a href="organization.html">医疗机构信息</a>&nbsp;&gt;&nbsp;公立医疗机构</p>
        </div>
        <!-- 您的位置结束 -->
        <div class="main" style="margin:5px auto 50px auto;">
            <div class="qrganization_area" style="border-top:0; margin-bottom:70px;">
                <div class="qrganization_areatlt">所在地区：</div>
                <ul>
                    <c:forEach items="${provinceList}" var="pro">
                        <li <c:if test="${pro eq province}">class="active"</c:if> onclick="proviceClick('${pro}')">${pro}</li>
                    </c:forEach>
                </ul>
            </div>
            <c:set var="i" value="1"></c:set>
            <c:forEach items="${institutionList}" var="bean">
                <c:if test="${i%4==1}">
                    <div class="qrganization_show">
                </c:if>
                <div class="qrganization_showcont"
                     <c:if test="${i%4==0}">style="margin-right:0;"</c:if> >
                    <a href="${base}/institution/detail?id=${bean.id}" target="_blank"><img width="258px" height="150px" src="${bean.images}" title="点击了解详情"/></a>

                    <div class="qrganization_hr">&nbsp;</div>
                    <p> <b>${bean.name}</b><br/>
                        <c:choose>
                            <c:when test="${bean.desc==''}">

                            </c:when>
                            <c:otherwise>
                                ${bean.desc}
                            </c:otherwise>
                        </c:choose>

                    </p>
                </div>
                <c:if test="${i%4==0}">
                    </div>
                </c:if>
                <c:set var="i" value="${i+1}"></c:set>
            </c:forEach>
            <c:if test="${i%4>0}">
        </div>
        </c:if>

        <!-- 分页开始 -->
        <div class="pages" id="pager"></div>
        <script type="text/javascript">
            var sign = 0;
            window.onload = function () {
                PAGER.initPager('${pageNo}', '${total}', '${pageSize}', 5, 'pager', getData);
            }
            function getData(currentPage, pageSize) {
                if (sign > 0) {
                    $("#pageNo").val(currentPage);
                    $("#searchForm").submit();
                }
                sign = 1;
            }
        </script>
        <!-- 分页End -->
    </div>

</div>
<!-- 内容区域结束 -->
<!-- 内容区域结束 -->
<jsp:include page="../include/foot.jsp"/>
</div>
<script type="application/javascript">
    function proviceClick(pro){
        $("#province").val(pro);
        $("#searchForm").submit();
    }
</script>
</body>
</html>
